Optimal. Leaf size=71 \[ -\frac{2 i a^3 \cot (c+d x)}{d}-\frac{4 a^3 \log (\sin (c+d x))}{d}-4 i a^3 x-\frac{a \cot ^2(c+d x) (a+i a \tan (c+d x))^2}{2 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.10625, antiderivative size = 71, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 4, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.167, Rules used = {3545, 3542, 3531, 3475} \[ -\frac{2 i a^3 \cot (c+d x)}{d}-\frac{4 a^3 \log (\sin (c+d x))}{d}-4 i a^3 x-\frac{a \cot ^2(c+d x) (a+i a \tan (c+d x))^2}{2 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3545
Rule 3542
Rule 3531
Rule 3475
Rubi steps
\begin{align*} \int \cot ^3(c+d x) (a+i a \tan (c+d x))^3 \, dx &=-\frac{a \cot ^2(c+d x) (a+i a \tan (c+d x))^2}{2 d}+(2 i a) \int \cot ^2(c+d x) (a+i a \tan (c+d x))^2 \, dx\\ &=-\frac{2 i a^3 \cot (c+d x)}{d}-\frac{a \cot ^2(c+d x) (a+i a \tan (c+d x))^2}{2 d}+(2 i a) \int \cot (c+d x) \left (2 i a^2-2 a^2 \tan (c+d x)\right ) \, dx\\ &=-4 i a^3 x-\frac{2 i a^3 \cot (c+d x)}{d}-\frac{a \cot ^2(c+d x) (a+i a \tan (c+d x))^2}{2 d}-\left (4 a^3\right ) \int \cot (c+d x) \, dx\\ &=-4 i a^3 x-\frac{2 i a^3 \cot (c+d x)}{d}-\frac{4 a^3 \log (\sin (c+d x))}{d}-\frac{a \cot ^2(c+d x) (a+i a \tan (c+d x))^2}{2 d}\\ \end{align*}
Mathematica [A] time = 1.0422, size = 126, normalized size = 1.77 \[ \frac{a^3 \csc \left (\frac{c}{2}\right ) \sec \left (\frac{c}{2}\right ) \csc ^2(c+d x) (\cos (3 d x)+i \sin (3 d x)) \left (-3 i \cos (c+2 d x)+\sin (c) \left (-2 \log \left (\sin ^2(c+d x)\right )+2 \cos (2 (c+d x)) \left (\log \left (\sin ^2(c+d x)\right )+2 i d x\right )-4 i d x-1\right )+3 i \cos (c)\right )}{4 d (\cos (d x)+i \sin (d x))^3} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.055, size = 65, normalized size = 0.9 \begin{align*} -4\,i{a}^{3}x-{\frac{4\,i{a}^{3}c}{d}}-4\,{\frac{{a}^{3}\ln \left ( \sin \left ( dx+c \right ) \right ) }{d}}-{\frac{3\,i\cot \left ( dx+c \right ){a}^{3}}{d}}-{\frac{{a}^{3} \left ( \cot \left ( dx+c \right ) \right ) ^{2}}{2\,d}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 2.52493, size = 92, normalized size = 1.3 \begin{align*} -\frac{8 i \,{\left (d x + c\right )} a^{3} - 4 \, a^{3} \log \left (\tan \left (d x + c\right )^{2} + 1\right ) + 8 \, a^{3} \log \left (\tan \left (d x + c\right )\right ) + \frac{6 i \, a^{3} \tan \left (d x + c\right ) + a^{3}}{\tan \left (d x + c\right )^{2}}}{2 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.19002, size = 251, normalized size = 3.54 \begin{align*} \frac{2 \,{\left (4 \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} - 3 \, a^{3} - 2 \,{\left (a^{3} e^{\left (4 i \, d x + 4 i \, c\right )} - 2 \, a^{3} e^{\left (2 i \, d x + 2 i \, c\right )} + a^{3}\right )} \log \left (e^{\left (2 i \, d x + 2 i \, c\right )} - 1\right )\right )}}{d e^{\left (4 i \, d x + 4 i \, c\right )} - 2 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 2.87831, size = 94, normalized size = 1.32 \begin{align*} - \frac{4 a^{3} \log{\left (e^{2 i d x} - e^{- 2 i c} \right )}}{d} + \frac{\frac{8 a^{3} e^{- 2 i c} e^{2 i d x}}{d} - \frac{6 a^{3} e^{- 4 i c}}{d}}{e^{4 i d x} - 2 e^{- 2 i c} e^{2 i d x} + e^{- 4 i c}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.4501, size = 158, normalized size = 2.23 \begin{align*} -\frac{a^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 64 \, a^{3} \log \left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + i\right ) + 32 \, a^{3} \log \left ({\left | \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) \right |}\right ) - 12 i \, a^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - \frac{48 \, a^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 12 i \, a^{3} \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - a^{3}}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2}}}{8 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]